/**
 * Created by python on 19-8-24.
 */

const HOST = 'http://127.0.0.1:8000/'


Vue.filter('str2date',function (value) {
    return new Date(value)
})

Vue.filter('date2ymd',function (value) {
    var year = value.getFullYear();
    var month = value.getMonth() + 1;
    var day = value.getDate();
    return year+"-"+month+"-"+day
})

Vue.filter('date2hms',function (value) {
    var hour = value.getHours();
    var minute = value.getMinutes();
    var second = value.getSeconds();
    return hour+":"+minute
})